import java.lang.reflect.Array;
import java.util.Arrays;


public class MyInvertor {

	static int[] reverse(int[] array){
		if (array == null)
            return null;

		int[] boofer = new int [array.length];
		
        for (int i = 0; i < array.length; i++)
        	boofer[i] = array[array.length - i - 1];
        
		return boofer;
	}
	public static void main(String[] args) {
		
		int[] array = new int[] {1, 3, 5, 7, 9};
		System.out.println(Arrays.toString( reverse( array )));
		array=reverse(array);
		System.out.println(Arrays.toString( reverse( array )));
	}

}
